//
//  HTTruckStyleVC.m
//  TruckDriver
//
//  Created by Ting Han on 2017/9/28.
//  Copyright © 2017年 Ting Han. All rights reserved.
//

#import "HTTruckStyleVC.h"

@interface HTTruckStyleVC ()<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong) UITableView *tableView;
@property (nonatomic,strong) NSMutableArray *dataSource;
@end

@implementation HTTruckStyleVC
static NSString *const cellId = @"cellId";
- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupNavi];
    [self configTableView];
}
- (void)configTableView{
    self.dataSource = [NSMutableArray array];
    self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, kHTScreenWidth, kHTScreenHeight) style:UITableViewStylePlain];
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    [self.view addSubview:self.tableView];
    self.tableView.backgroundColor = kBackgroundColor;
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:cellId];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
   
}
- (void)setupNavi{
    UIBarButtonItem *right = [[UIBarButtonItem alloc]initWithTitle:@"保存" style:UIBarButtonItemStyleDone target:self action:@selector(didClickNavRight:)];
    self.navigationItem.rightBarButtonItem = right;
}
- (void)didClickNavRight:(id)sender{
    
}
#pragma mark --- tableView
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.dataSource.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId forIndexPath:indexPath];
    return cell;
}
@end
